﻿using AMatysiak.Controls;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace AMatysiakTest
{
    [TestClass]
    public class CurrencyBoxTest
    {
        [TestMethod]
        public void testNormalTextBox()
        {
            CurrencyBox box = new CurrencyBox();
            box.Text = "10";

            Assert.AreEqual("10,00 zł", box.Text);
        }

        [TestMethod]
        public void testSetValue()
        {
            CurrencyBox box = new CurrencyBox();
            box.Value = 10.25;

            Assert.AreEqual("10,25 zł", box.Text);
        }

        [TestMethod]
        public void testSetAndManipulateValue()
        {
            CurrencyBox box = new CurrencyBox();
            box.Value = 10.25;
            box.Value += 0.75;

            Assert.AreEqual("11,00 zł", box.Text);
        }
    }
}
